<div style="display: flex; height: 100%;">
  <div style="width:20%;">
    <gn-resources-organization-tree #tree (onSelectionChanged)="refreshTable(tree.selectedData.id)">
    </gn-resources-organization-tree>
  </div>
  <div style="width: 80%; padding-left: 1rem;">
    <gn-buttons>
      <button mat-raised-button gnTableButtonNew gnDialog [content]="typeEdit"
              [disabled]="tree.selectedData.id === null"
              (onClose)="table.loadData()" [data]="{orgId: tree.selectedData.id}"></button>
      <button mat-raised-button gnTableButtonDelete [table]="table" (click)="delete()"></button>
      <button mat-raised-button [disabled]="!table.hasSelectedOne" gnDialog [content]="typeRole"
              [data]="table.selection.selected.length > 0?table.selection.selected[0].user.id:null"
              (onClose)="table.loadData()">设置角色
      </button>
      <button mat-raised-button [disabled]="!table.hasSelected" (click)="resetPassword()">重置密码</button>
    </gn-buttons>
    <gn-table idField="id" url="/RESOURCES-SERVICE/orgUsers" sortField="name" [includes]="['user', 'user.roles']"
              [columns]="columns" [autoLoad]="false">
    </gn-table>
  </div>
